const state = {
  clientOrder: JSON.parse(sessionStorage.getItem('clientOrder') || '{}'),
  factoryOrder: JSON.parse(sessionStorage.getItem('factoryOrder') || '{}')
}
const mutations = {
  setClientOrder(state, val = {}) {
    state.clientOrder = val
    sessionStorage.setItem('clientOrder', JSON.stringify(val))
  },
  setFactoryOrder(state, val = {}) {
    state.factoryOrder = val
    sessionStorage.setItem('factoryOrder', JSON.stringify(val))
  }
}

export default {
  namespaced: true,
  state,
  mutations
}
